Repository navigation
Wire the detail drawer, compare sheet, share card, Street View preview and category icon into the map - #338
Conversation
…w and category icon into the map
|
@propcgamer20-png is attempting to deploy a commit to the studentsuite Team on Vercel. A member of the Team first needs to authorize it. |
|
Thanks for the PR. Held for a rebase, not rejected. #337 was squash-merged as 9a1fca7, so the stacked commit in this branch no longer matches main. Merging main into this branch conflicts in:
Please rebase onto current main (or What I checked on the branch as it stands: typecheck clean, 685 of 685 unit tests pass. Not checked: the drawer, compare sheet and Street View card in a browser, which the PR description also lists as unverified. I will look at those after the rebase. |
What this changes
Part of #313. Wires five more of the standalone components that no page imported yet. Each is its own checkbox in that issue.
PlaceDetailDrawer: every row in the results list gets an info button ("Details for ") that opens the drawer;PlacesMapholds the open place. The drawer is now scrollable.SharePlaceCardandPlacePhotoGallery: shown inside that drawer, under the directions button (copy a link to the focused pin, copy name and address as text, and a Street View preview with the component's own "not every location has coverage" note).ComparePlacesSheet: each row gets a "Compare " checkbox (a native input, labelled); ticking 2 or 3 enables a "Compare (n)" button above the list, and the sheet shows the places side by side with pairwise distances. A fourth tick is disabled, and "Clear selection" resets. Selection lives inPlacesMap, so it survives filtering as long as the places exist.CategoryIcon: replaces the plain colour dot in the results rows, the pin popup's type chip, the drawer and the compare sheet, which is the duplication the issue pointed at. The icon is tinted with the samePLACE_TYPE_COLORS, so the colour still matches the pin. The category chips keep their dots on purpose: they are the map legend for the clustered pie pins.Not touched:
PlaceReviewBadgeandRecentAdditionsFeedneed data the schema does not have (ratings, added-on dates);HeatmapToggleneeds heatmap rendering first. #313 stays open for those three.This branch is stacked on #337 (country filter), because both change
places-map.tsxandmap-panel.tsx; that commit drops out of this diff when #337 merges.Proof
results-list.test.tsx(+3: details button, nothing extra by default, compare needs two picks and caps at three) andplaces-map.test.tsx(+2: the drawer opens with the Street View card and copy button, two picked places open the compare sheet).npm run typecheck,npm run lint,npm run format:check,npm run buildclean; unit tests: 72 files, 685 pass.Not verified
I did not open
/mapin a browser. Not checked by eye: how the drawer and the compare sheet sit next to the map on a phone, whether the Street View iframe renders for a given place (Google serves it, and it can be blank where there is no coverage, as the component itself says), or the extra checkbox and info button making rows tight in the narrow sidebar.Type of change